build/: Rename a Shared MSVC NMake Makefile
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 13 Jan 2014 09:19:07 +0000 (17:19 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 13 Jan 2014 09:19:07 +0000 (17:19 +0800)
Rename testsrules_msvc.mak to detectenv_msvc.mak and remove some package-
specific stuff from it, to reflect on the nature that this NMake Makefile
is shared.

build/Makefile.am
build/detectenv_msvc.mak [new file with mode: 0644]
build/gtk-introspection-msvc.mak
build/testsrules_msvc.mak [deleted file]

index 817a9d72a8afceacebe575551d012af27eb39789..931735b4fa095ac985eec922e4db224b7aa0c292 100644 (file)
@@ -6,7 +6,7 @@ SUBDIRS = \
 EXTRA_DIST +=  \
        msvcfiles.py    \
        gen-file-list-gtk.py    \
-       testsrules_msvc.mak     \
+       detectenv_msvc.mak      \
        introspection-msvc.mak  \
        gtk-introspection-msvc.mak
 
diff --git a/build/detectenv_msvc.mak b/build/detectenv_msvc.mak
new file mode 100644 (file)
index 0000000..020548a
--- /dev/null
@@ -0,0 +1,65 @@
+# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
+# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
+!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
+MSG = ^
+This Makefile is only for Visual Studio 2008 and later.^
+You need to ensure that the Visual Studio Environment is properly set up^
+before running this Makefile.
+!error $(MSG)
+!endif
+
+ERRNUL  = 2>NUL
+_HASH=^#
+
+!if ![echo VCVERSION=_MSC_VER > vercl.x] \
+    && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
+    && ![echo PLAT=Win32 >> vercl.x] \
+    && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
+    && ![echo PLAT=x64 >> vercl.x] \
+    && ![echo $(_HASH)endif >> vercl.x] \
+    && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
+!include vercl.i
+!if ![echo VCVER= ^\> vercl.vc] \
+    && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
+!include vercl.vc
+!endif
+!endif
+!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!endif
+
+!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
+VSVER = 9
+!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
+VSVER = 10
+!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
+VSVER = 11
+!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
+VSVER = 12
+!else
+VSVER = 0
+!endif
+
+!if "$(VSVER)" == "0"
+MSG = ^
+This NMake Makefile set supports Visual Studio^
+9 (2008) through 12 (2013).  Your Visual Studio^
+version is not supported.
+!error $(MSG)
+!endif
+
+VALID_CFGSET = FALSE
+!if "$(CFG)" == "release" || "$(CFG)" == "debug"
+VALID_CFGSET = TRUE
+!endif
+
+!if "$(CFG)" == "release"
+CFLAGS_ADD = /MD /O2
+!else
+CFLAGS_ADD = /MDd /Od /Zi
+!endif
+
+!if "$(PLAT)" == "x64"
+LDFLAGS_ARCH = /machine:x64
+!else
+LDFLAGS_ARCH = /machine:x86
+!endif
index f1b22fd8d80fe8ecb6d5a0358430aaed33fd6128..711ae579d9bc2ac3f3bea1ec6b1232b9e7eb4903 100644 (file)
@@ -6,7 +6,7 @@ GTK_DLLNAME = gtk-3-vs$(VSVER)
 
 # Please do not change anything after this line
 
-!include testsrules_msvc.mak
+!include detectenv_msvc.mak
 
 APIVERSION = 3.0
 
diff --git a/build/testsrules_msvc.mak b/build/testsrules_msvc.mak
deleted file mode 100644 (file)
index 06c908e..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
-# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
-!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
-MSG = ^
-This Makefile is only for Visual Studio 2008 and later.^
-You need to ensure that the Visual Studio Environment is properly set up^
-before running this Makefile.
-!error $(MSG)
-!endif
-
-ERRNUL  = 2>NUL
-_HASH=^#
-
-!if ![echo VCVERSION=_MSC_VER > vercl.x] \
-    && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
-    && ![echo PLAT=Win32 >> vercl.x] \
-    && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
-    && ![echo PLAT=x64 >> vercl.x] \
-    && ![echo $(_HASH)endif >> vercl.x] \
-    && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
-!include vercl.i
-!if ![echo VCVER= ^\> vercl.vc] \
-    && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
-!include vercl.vc
-!endif
-!endif
-!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
-!endif
-
-!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
-VSVER = 9
-!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
-VSVER = 10
-!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
-VSVER = 11
-!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
-VSVER = 12
-!else
-VSVER = 0
-!endif
-
-!if "$(VSVER)" == "0"
-MSG = ^
-This NMake Makefile set supports Visual Studio^
-9 (2008) through 12 (2013).  Your Visual Studio^
-version is not supported.
-!error $(MSG)
-!endif
-
-VALID_CFGSET = FALSE
-!if "$(CFG)" == "release" || "$(CFG)" == "debug"
-VALID_CFGSET = TRUE
-!endif
-
-!if "$(CFG)" == "release"
-CFLAGS_ADD = /MD /O2
-!else
-CFLAGS_ADD = /MDd /Od /Zi
-!endif
-
-!if "$(PLAT)" == "x64"
-LDFLAGS_ARCH = /machine:x64
-!else
-LDFLAGS_ARCH = /machine:x86
-!endif
-
-LD = link.exe
-LD_CFLAGS = /link
-EXEEXT = .exe
-GLIB_LIBS = gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib
-
-ATK_API_VERSION = 1.0